Option Explicit On 
Option Strict On

Imports TreeCreeper01Interfaces

Friend Class cListFilterCollection
    Implements IListFilterCollection



    Private pListFilterCollection As Collection


    Public Sub New()
        pListFilterCollection = New Collection
    End Sub

    Public Function AddListFilter(ByVal Name As String) As IListFilter Implements IListFilterCollection.AddListFilter
        Dim ListFilter As IListFilter
        ListFilter = New cListFilter(Name)
        pListFilterCollection.Add(ListFilter, ListFilter.Name)
        Return ListFilter
    End Function

    'Public Sub AddListFilter(ByVal ListFilter As IListFilter) Implements IListFilterCollection.AddListFilter
    '    pListFilterCollection.Add(ListFilter, ListFilter.Name)
    'End Sub


    Public ReadOnly Property Count() As Integer Implements IListFilterCollection.Count
        Get
            Return pListFilterCollection.Count
        End Get
    End Property


    Public ReadOnly Property ListFilterByIndexBaseOne(ByVal Index As Integer) As IListFilter Implements IListFilterCollection.ListFilterByIndexBaseOne
        Get
            Dim ListFilter As IListFilter
            ListFilter = CType(pListFilterCollection.Item(Index), IListFilter)
            Return ListFilter
        End Get
    End Property


    Public ReadOnly Property ListFilterByName(ByVal Name As String) As IListFilter Implements IListFilterCollection.ListFilterByName
        Get
            Dim ListFilter As IListFilter
            ListFilter = CType(pListFilterCollection.Item(Name), IListFilter)
            Return ListFilter
        End Get
    End Property


End Class
